package 外观模式;

public class Facade {
    SubSystemOne subSystemOne;
    SubSystemTwo subSystemTwo;
    SubSystemThree subSystemThree;
    SubSystemFour subSystemFour;
    public Facade(){
        subSystemOne = new SubSystemOne();
        subSystemTwo = new SubSystemTwo();
        subSystemThree = new SubSystemThree();
        subSystemFour = new SubSystemFour();
    }

    public void MethodA(){
        System.out.println("方案一");
        subSystemOne.MethodOne();
        subSystemTwo.MethodOne();
        subSystemFour.MethodOne();
    }
    public void MethodB(){
        System.out.println("方案二");
        subSystemOne.MethodOne();
        subSystemThree.MethodOne();
        subSystemFour.MethodOne();
    }
}
